# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Container.V1.Model.UpdateNodePoolRequest do
  @moduledoc """
  UpdateNodePoolRequests update a node pool's image and/or version.

  ## Attributes

  *   `fastSocket` (*type:* `GoogleApi.Container.V1.Model.FastSocket.t`, *default:* `nil`) - Enable or disable NCCL fast socket for the node pool.
  *   `labels` (*type:* `GoogleApi.Container.V1.Model.NodeLabels.t`, *default:* `nil`) - The desired node labels to be applied to all nodes in the node pool. If this field is not present, the labels will not be changed. Otherwise, the existing node labels will be *replaced* with the provided labels.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name (project, location, cluster, node pool) of the node pool to update. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
  *   `resourceManagerTags` (*type:* `GoogleApi.Container.V1.Model.ResourceManagerTags.t`, *default:* `nil`) - Desired resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. Existing tags will be replaced with new values.
  *   `taints` (*type:* `GoogleApi.Container.V1.Model.NodeTaints.t`, *default:* `nil`) - The desired node taints to be applied to all nodes in the node pool. If this field is not present, the taints will not be changed. Otherwise, the existing node taints will be *replaced* with the provided taints.
  *   `containerdConfig` (*type:* `GoogleApi.Container.V1.Model.ContainerdConfig.t`, *default:* `nil`) - The desired containerd config for nodes in the node pool. Initiates an upgrade operation that recreates the nodes with the new config.
  *   `kubeletConfig` (*type:* `GoogleApi.Container.V1.Model.NodeKubeletConfig.t`, *default:* `nil`) - Node kubelet configs.
  *   `nodeVersion` (*type:* `String.t`, *default:* `nil`) - Required. The Kubernetes version to change the nodes to (typically an upgrade). Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - "latest": picks the highest valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the Kubernetes master version
  *   `loggingConfig` (*type:* `GoogleApi.Container.V1.Model.NodePoolLoggingConfig.t`, *default:* `nil`) - Logging configuration.
  *   `confidentialNodes` (*type:* `GoogleApi.Container.V1.Model.ConfidentialNodes.t`, *default:* `nil`) - Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled.
  *   `gcfsConfig` (*type:* `GoogleApi.Container.V1.Model.GcfsConfig.t`, *default:* `nil`) - GCFS config.
  *   `clusterId` (*type:* `String.t`, *default:* `nil`) - Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  *   `accelerators` (*type:* `list(GoogleApi.Container.V1.Model.AcceleratorConfig.t)`, *default:* `nil`) - A list of hardware accelerators to be attached to each node. See https://cloud.google.com/compute/docs/gpus for more information about support for GPUs.
  *   `maxRunDuration` (*type:* `String.t`, *default:* `nil`) - The maximum duration for the nodes to exist. If unspecified, the nodes can exist indefinitely.
  *   `windowsNodeConfig` (*type:* `GoogleApi.Container.V1.Model.WindowsNodeConfig.t`, *default:* `nil`) - Parameters that can be configured on Windows nodes.
  *   `nodePoolId` (*type:* `String.t`, *default:* `nil`) - Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.
  *   `linuxNodeConfig` (*type:* `GoogleApi.Container.V1.Model.LinuxNodeConfig.t`, *default:* `nil`) - Parameters that can be configured on Linux nodes.
  *   `resourceLabels` (*type:* `GoogleApi.Container.V1.Model.ResourceLabels.t`, *default:* `nil`) - The resource labels for the node pool to use to annotate any related Google Compute Engine resources.
  *   `tags` (*type:* `GoogleApi.Container.V1.Model.NetworkTags.t`, *default:* `nil`) - The desired network tags to be applied to all nodes in the node pool. If this field is not present, the tags will not be changed. Otherwise, the existing network tags will be *replaced* with the provided tags.
  *   `gvnic` (*type:* `GoogleApi.Container.V1.Model.VirtualNIC.t`, *default:* `nil`) - Enable or disable gvnic on the node pool.
  *   `diskType` (*type:* `String.t`, *default:* `nil`) - Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or 'pd-balanced') for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk type.
  *   `diskSizeGb` (*type:* `String.t`, *default:* `nil`) - Optional. The desired disk size for nodes in the node pool specified in GB. The smallest allowed disk size is 10GB. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk size.
  *   `locations` (*type:* `list(String.t)`, *default:* `nil`) - The desired list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the node pool's nodes should be located. Changing the locations for a node pool will result in nodes being either created or removed from the node pool, depending on whether locations are being added or removed.
  *   `machineType` (*type:* `String.t`, *default:* `nil`) - Optional. The desired [Google Compute Engine machine type](https://cloud.google.com/compute/docs/machine-types) for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified machine type.
  *   `imageType` (*type:* `String.t`, *default:* `nil`) - Required. The desired image type for the node pool. Please see https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for available image types.
  *   `zone` (*type:* `String.t`, *default:* `nil`) - Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.
  *   `queuedProvisioning` (*type:* `GoogleApi.Container.V1.Model.QueuedProvisioning.t`, *default:* `nil`) - Specifies the configuration of queued provisioning.
  *   `storagePools` (*type:* `list(String.t)`, *default:* `nil`) - List of Storage Pools where boot disks are provisioned. Existing Storage Pools will be replaced with storage-pools.
  *   `nodeNetworkConfig` (*type:* `GoogleApi.Container.V1.Model.NodeNetworkConfig.t`, *default:* `nil`) - Node network config.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - The current etag of the node pool. If an etag is provided and does not match the current etag of the node pool, update will be blocked and an ABORTED error will be returned.
  *   `projectId` (*type:* `String.t`, *default:* `nil`) - Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.
  *   `upgradeSettings` (*type:* `GoogleApi.Container.V1.Model.UpgradeSettings.t`, *default:* `nil`) - Upgrade settings control disruption and speed of the upgrade.
  *   `workloadMetadataConfig` (*type:* `GoogleApi.Container.V1.Model.WorkloadMetadataConfig.t`, *default:* `nil`) - The desired workload metadata config for the node pool.
  *   `flexStart` (*type:* `boolean()`, *default:* `nil`) - Flex Start flag for enabling Flex Start VM.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :fastSocket => GoogleApi.Container.V1.Model.FastSocket.t() | nil,
          :labels => GoogleApi.Container.V1.Model.NodeLabels.t() | nil,
          :name => String.t() | nil,
          :resourceManagerTags => GoogleApi.Container.V1.Model.ResourceManagerTags.t() | nil,
          :taints => GoogleApi.Container.V1.Model.NodeTaints.t() | nil,
          :containerdConfig => GoogleApi.Container.V1.Model.ContainerdConfig.t() | nil,
          :kubeletConfig => GoogleApi.Container.V1.Model.NodeKubeletConfig.t() | nil,
          :nodeVersion => String.t() | nil,
          :loggingConfig => GoogleApi.Container.V1.Model.NodePoolLoggingConfig.t() | nil,
          :confidentialNodes => GoogleApi.Container.V1.Model.ConfidentialNodes.t() | nil,
          :gcfsConfig => GoogleApi.Container.V1.Model.GcfsConfig.t() | nil,
          :clusterId => String.t() | nil,
          :accelerators => list(GoogleApi.Container.V1.Model.AcceleratorConfig.t()) | nil,
          :maxRunDuration => String.t() | nil,
          :windowsNodeConfig => GoogleApi.Container.V1.Model.WindowsNodeConfig.t() | nil,
          :nodePoolId => String.t() | nil,
          :linuxNodeConfig => GoogleApi.Container.V1.Model.LinuxNodeConfig.t() | nil,
          :resourceLabels => GoogleApi.Container.V1.Model.ResourceLabels.t() | nil,
          :tags => GoogleApi.Container.V1.Model.NetworkTags.t() | nil,
          :gvnic => GoogleApi.Container.V1.Model.VirtualNIC.t() | nil,
          :diskType => String.t() | nil,
          :diskSizeGb => String.t() | nil,
          :locations => list(String.t()) | nil,
          :machineType => String.t() | nil,
          :imageType => String.t() | nil,
          :zone => String.t() | nil,
          :queuedProvisioning => GoogleApi.Container.V1.Model.QueuedProvisioning.t() | nil,
          :storagePools => list(String.t()) | nil,
          :nodeNetworkConfig => GoogleApi.Container.V1.Model.NodeNetworkConfig.t() | nil,
          :etag => String.t() | nil,
          :projectId => String.t() | nil,
          :upgradeSettings => GoogleApi.Container.V1.Model.UpgradeSettings.t() | nil,
          :workloadMetadataConfig =>
            GoogleApi.Container.V1.Model.WorkloadMetadataConfig.t() | nil,
          :flexStart => boolean() | nil
        }

  field(:fastSocket, as: GoogleApi.Container.V1.Model.FastSocket)
  field(:labels, as: GoogleApi.Container.V1.Model.NodeLabels)
  field(:name)
  field(:resourceManagerTags, as: GoogleApi.Container.V1.Model.ResourceManagerTags)
  field(:taints, as: GoogleApi.Container.V1.Model.NodeTaints)
  field(:containerdConfig, as: GoogleApi.Container.V1.Model.ContainerdConfig)
  field(:kubeletConfig, as: GoogleApi.Container.V1.Model.NodeKubeletConfig)
  field(:nodeVersion)
  field(:loggingConfig, as: GoogleApi.Container.V1.Model.NodePoolLoggingConfig)
  field(:confidentialNodes, as: GoogleApi.Container.V1.Model.ConfidentialNodes)
  field(:gcfsConfig, as: GoogleApi.Container.V1.Model.GcfsConfig)
  field(:clusterId)
  field(:accelerators, as: GoogleApi.Container.V1.Model.AcceleratorConfig, type: :list)
  field(:maxRunDuration)
  field(:windowsNodeConfig, as: GoogleApi.Container.V1.Model.WindowsNodeConfig)
  field(:nodePoolId)
  field(:linuxNodeConfig, as: GoogleApi.Container.V1.Model.LinuxNodeConfig)
  field(:resourceLabels, as: GoogleApi.Container.V1.Model.ResourceLabels)
  field(:tags, as: GoogleApi.Container.V1.Model.NetworkTags)
  field(:gvnic, as: GoogleApi.Container.V1.Model.VirtualNIC)
  field(:diskType)
  field(:diskSizeGb)
  field(:locations, type: :list)
  field(:machineType)
  field(:imageType)
  field(:zone)
  field(:queuedProvisioning, as: GoogleApi.Container.V1.Model.QueuedProvisioning)
  field(:storagePools, type: :list)
  field(:nodeNetworkConfig, as: GoogleApi.Container.V1.Model.NodeNetworkConfig)
  field(:etag)
  field(:projectId)
  field(:upgradeSettings, as: GoogleApi.Container.V1.Model.UpgradeSettings)
  field(:workloadMetadataConfig, as: GoogleApi.Container.V1.Model.WorkloadMetadataConfig)
  field(:flexStart)
end

defimpl Poison.Decoder, for: GoogleApi.Container.V1.Model.UpdateNodePoolRequest do
  def decode(value, options) do
    GoogleApi.Container.V1.Model.UpdateNodePoolRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Container.V1.Model.UpdateNodePoolRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
